package com.example.bzh.gamecat.ui.message.innerfriend.subscription;

import android.os.Bundle;
import android.view.View;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.ImageView;

import com.example.bzh.gamecat.R;
import com.example.bzh.gamecat.base.BaseActivity;

import butterknife.BindView;
import butterknife.OnCheckedChanged;
import butterknife.OnClick;

public class SubscriptionActivity extends BaseActivity {

    @BindView(R.id.iv_subscription_back)
    ImageView ivSubscriptionBack;
    @BindView(R.id.cb_hot_subscription)
    CheckBox cbHotSubscription;
    @BindView(R.id.cb_info_subscription)
    CheckBox cbInfoSubscription;
    @BindView(R.id.cb_live_subscription)
    CheckBox cbLiveSubscription;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    public int getLayoutId() {
        return R.layout.activity_subscription;
    }

    @Override
    public void initView() {
        super.initView();
    }

    @OnClick({R.id.iv_subscription_back})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.iv_subscription_back:
                finish();
                break;
        }
    }

    @OnCheckedChanged({R.id.cb_hot_subscription, R.id.cb_info_subscription, R.id.cb_live_subscription})
    public void OnCheckedChanged(CompoundButton var1, boolean var2) {
        switch (var1.getId()) {
            case R.id.cb_hot_subscription:
                if (var2) {
                    cbHotSubscription.setText("订阅");
                } else {
                    cbHotSubscription.setText("取消订阅");
                }
                break;
            case R.id.cb_info_subscription:
                if (var2) {
                    cbInfoSubscription.setText("订阅");
                } else {
                    cbInfoSubscription.setText("取消订阅");
                }
                break;
            case R.id.cb_live_subscription:
                if (var2) {
                    cbLiveSubscription.setText("订阅");
                } else {
                    cbLiveSubscription.setText("取消订阅");
                }
                break;
        }
    }
}
